﻿using QuickCode.Application.DTO;

namespace QuickCode.IApplication
{
    public interface IUserApplication
    {
        /// <summary>
        /// 查询用户
        /// </summary>
        /// <returns></returns>
        public string GetFirstUserName();

        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public bool AddUser(UserDTO user);

        /// <summary>
        /// 获取用户
        /// </summary>
        /// <returns></returns>
        public List<UserDTO> GetUsers();

        /// <summary>
        /// 设置用户缓存
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public string SetUserCache(string userName);

        /// <summary>
        /// CodeFirst 创建数据库表
        /// </summary>
        /// <returns></returns>
        public bool CreateTable();

        /// <summary>
        /// DBFirst 创建实体文件
        /// </summary>
        /// <returns></returns>
        public bool CreateEntity();
    }
}